﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/Admin.Master" AutoEventWireup="true" CodeBehind="User_Insert.aspx.cs" Inherits="Ryder_US_Website.Presentation.Admin.User_Insert" Title="Thêm nhân viên" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script language="javascript" type="text/javascript">
        function validateForm() {
        if (document.getElementById('<%= txtTenDangNhap.ClientID %>').value=="" || document.getElementById('<%= txtTenDangNhap.ClientID %>').value.length<1) {
            alert("Tên đăng nhập không được trống.");
            document.getElementById('<%= txtTenDangNhap.ClientID %>').focus();
        }
        else if (document.getElementById('<%= txtMatKhau.ClientID %>').value == "" || document.getElementById('<%= txtMatKhau.ClientID %>').value.length < 1) {
            alert("Mật khẩu không được trống.");
            document.getElementById('<%= txtMatKhau.ClientID %>').focus();
        }
        else
            return true;
        return false;
    }
</script>
<h1 class="title">Thêm mới nhân viên</h1>
<p></p>
<form id="InsertForm" name="InsertForm" action="" method="post">
     <table style="width: 91%;">
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td style="width: 25%" class="style2">
                <asp:Label ID="lbLoaiNhanVien" runat="server" Text="lbLoaiNhanVien">Loại nhân 
                viên:</asp:Label>
            </td>
            <td style="width: 2%">
            </td>
            <td colspan="2" class="style1">
                <asp:RadioButton ID="rbQuanTri" runat="server" Text="Quản trị viên" Checked="True"
                    GroupName="role" Font-Size="Medium" />
                &nbsp;
                <asp:RadioButton ID="rbNhanVien" runat="server" Text="Nhân viên" GroupName="role"
                    Font-Size="Medium" />
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label1" runat="server" Text="lbTenDangNhap">Tên đăng nhập:</asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                <asp:TextBox ID="txtTenDangNhap" runat="server" Width="350px" Font-Size="Medium"></asp:TextBox>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lbMatKhau" runat="server" Text="lbMatKhau"> Mật khẩu:</asp:Label>
            </td>
            <td class="style1">
                &nbsp;
            </td>
            <td colspan="2" class="style1">
                <asp:TextBox ID="txtMatKhau" runat="server" TextMode="Password" Width="350px" 
                    Font-Size="Medium" ></asp:TextBox>
                
            </td>
        </tr>
        <tr>
            <td colspan="4" class="style1">
                <p>
                </p>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            </td>
            <td colspan="2">
                <asp:Button ID="btnLamLai" runat="server" Text="Làm lại" CssClass="button" 
                    onclick="btnLamLai_Click1"/>&nbsp;
                <asp:Button ID="btnThem" runat="server" Text="Thêm mới"  CssClass="button" OnClientClick="return validateForm();" 
                    onclick="btnThem_Click1" />&nbsp;
                <asp:Button ID="btnHuy" runat="server" Text="Hủy" CssClass="button" 
                    onclick="btnHuy_Click" />
            </td>
        </tr>
    </table>
</form>
</asp:Content>
